import { IForm } from '@/base-ui/form'

export const contentTableConfig: IForm = {
  labelWidth: '100px',
  itemStyle: {
    padding: '10px 40px'
  },
  colLayout: {
    span: 8
  },
  formItems: [
    {
      field: 'table_name',
      type: 'input',
      label: 'Table Name',
      placeholder: 'Please input table name',
      rules: [
        {
          required: true,
          message: 'username is required~',
          trigger: 'blur'
        },
        {
          pattern: /^[a-z0-9_A-Z]{5,20}$/,
          message: 'The table_name length between 5-10~',
          trigger: 'blur'
        }
      ]
    },
    {
      field: 'user_id',
      type: 'input',
      label: 'User Name',
      placeholder: 'Please input user name'
    },
    {
      field: 'status',
      type: 'select',
      label: 'Status',
      placeholder: 'Please select status',
      options: [
        { title: 'pending', value: 1 },
        { title: 'approved', value: 2 }
      ]
    }
  ]
}
